#include "stdafx.h"
#include "async_curl.h"

int main(int argc, char *argv[]) {
	async_curl::gcurl_init();
	async_curl::get("https://www.baidu.com",
		[](int code, const std::string& ret) {
		std::cout << "code = " << code << std::endl
			<< "ret doc = " << ret << std::endl;
		//exit
		async_curl::gcurl_exit();
	});
	async_curl::gcurl_wait();
	printf("press any key to exit... \n");
	getchar();
	return EXIT_SUCCESS;
}
